<?php
/**
 * GeryEngine
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this release in the file LICENSE
 *
 * @copyright  Copyright (c) 2007 Arjen Brouwer
 * @license    New BSD License
 * @author     Arjen Brouwer
 */

abstract class ProxyCodeGenerator implements ICodeGenerator {
	
	public function appendValueAssignment($var, $value, $type = CodeGenerator::ASSIGN_NORMAL) {
		$this->generator()->appendValueAssignment($var, $value, $type);
	}
	
	public function appendCustomCode($code, $style = null) {
		$this->generator()->appendCustomCode($code, $style);
	}
	
	public function appendIf($condition) {
		$this->generator()->appendIf($condition);
	}
	
	public function appendEndIf() {
		$this->generator()->appendEndIf();
	}
	
	public function appendElse($ifCondition = null) {
		$this->generator()->appendElse($ifCondition);
	}
	
	public function appendForeach($condition) {
		$this->generator()->appendForeach($condition);
	}
	
	public function appendEndForeach() {
		$this->generator()->appendEndForeach();
	}
	
	public function output() {
		return $this->generator()->output();
	}
	
	/**
	 * Returns the generator that is proxied
	 * 
	 * @return CodeGenerator
	 */
	abstract public function generator();
}
?>